<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>WDShare管理中心-添加活动</title>
<meta name="auther" content="F7" />
<% include ../etc/htmlhead.ejs %>
<script src="/static/ueditor/manage.ueditor.config.js"></script>
<script src="/static/ueditor/ueditor.all.min.js"> </script>
<script src="/static/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>

<body>
<% include ../etc/head.ejs %>
<div class="manage">
  <% include ../etc/left.ejs %>
  <div class="manage-right">
    <h1 class="manage-title">活动管理</h1>
    <div class="manage-module">
      <form id="js-create-form">
        <input type="hidden" name="aId" value="" />
        <div class="manage-module-head">
          <h3 class="manage-module-title">添加活动</h3>
          <div class="manage-tool">
            <input class="green" type="submit" value="提交"/>
            <input class="gray" type="reset" value="重置"/>
          </div>
        </div>
        <div class="manage-module-con">
          <div class="manage-addActive-form">
            <div class="manage-addActive-form-item">
              <label>
                <strong>活动分类：</strong>
                <select name="aClass">
                  <option value="" selected>请选择活动分类</option>
                  <% result.forEach(function(channel){ %>
                  <option value="<%= channel._id%>"><%= channel.name%></option>
                  <% }) %>
                </select>
              </label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong>活动名称：</strong><input type="text" name="aName"/><span>活动主题</span></label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong>活动时间：</strong>
              <input type="text" name="aTime"/><span>案例：2014-7-26 14:00 -- 18:00</span></label>
            </div>
            <!-- <div class="manage-addActive-form-item">
              <label><strong>报名截止时间：</strong><input type="text" name="aJoinEndTime" /><span>暂不启用</span>
              </label>        
            </div> -->
            <div class="manage-addActive-form-item">
              <label><strong>地点：</strong>
              <input type="text" name="aAddress"/><span>支持HTML</span></label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong>活动摘要：</strong><input type="text" name="aSummary"/><span>显示在活动内容页顶部的信息，可以不填写【将不显示任何内容】</span></label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong>活动内容：</strong></label>
            </div>
            <div class="editor-box"><textarea name="aContent" id="editor" style="height:400px;"></textarea></div>
            <div class="manage-addActive-form-item">
              <label><strong>活动状态：</strong>
              <select name="aStatus">
                <option value="0">关闭</option>
                <option value="1" selected>开启</option>
                <option value="2">暂停报名</option>
                <option value="3">未开始报名</option>
              </select>
              </label>
            </div>
            <div class="manage-addActive-form-note"><em>高级配置</em></div>
            <div class="manage-addActive-form-item">
              <label><strong>邀请码前缀：</strong>
              <input type="text" name="aCodebefor"/><span>跟邀请码拼在一起</span></label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong>备注：</strong>
              <input type="text" name="aComment"/><span>前台不显示，仅作为活动备注记录</span></label>
            </div>

            <div class="manage-addActive-form-item">
              <label><strong>排序：</strong>
              <input type="text" name="aSort" value="0" /><span>默认为 0</span></label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong>模板：</strong>
              <input type="text" name="aTpl" value="index" /><span>填写对应的ejs模板名称，该模板必须存在与/views/active/end 目录下时才有效【默认index】</span></label>
            </div>
            <div class="manage-addActive-form-item manage-addActive-form-radio">
              <strong>是否允许评论：</strong>
              <label><input type="radio" name="isComment" value="1" checked="checked"> 是</label>
              <label><input type="radio" name="isComment" value="0"> 否</label>
            </div>
            <div class="manage-addActive-form-item">
              <label><strong>邀请函模板：</strong>
              <textarea name="aEmailTpl"><div style="color:#333333;border:1px dashed #D8D8D8;margin:10px;"><h1 style="text-align:center;margin:20px 10px;padding:0 10px 20px;border-bottom:1px dashed #D8D8D8;">{=title} -- 前端交流会邀请函</h1><div style="font-size:14px;font-family:'Helvetica Neue', Helvetica Neue, Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', Arial;line-height:1.8em;padding:0 10px;"><p>尊敬的 {=name}：</p><p>我们诚挚的邀请您参会，期待与您在会场相见。</p><div style="background-color:#F2F2F2;padding:5px 20px;"><p>邀请码<span style="font-size:12px;">（请记录，以便快速入场）</span>：</p><p style="font-size:40px; color:#ff0000;">{=code}</p></div><p>{=blank}</p><p>请确认报名，如不能点击请浏览器打开<strong>【不确认将放弃本次报名】</strong>：<br /><a href="http://www.wdshare.org/active/joinconfirm/{=id}" target="_blank">http://www.wdshare.org/active/joinconfirm/{=id}</a></p><p>{=blank}</p><p>时间：<strong>{=time}</strong> {=blank}{=blank}{=blank} 13:30开始签到</p><p>地址：{=address}</p><p>内容：具体分享课题请查阅官网</p><p>联系人：<strong>【F7】182-9182-6889</strong></p>{=signature}</div></div></textarea><br />
              <span>邀请函发送模板，支持的标签有：{=title}--活动标题； {=name}--姓名； {=code}--邀请码； {=mail}--报名邮箱； {=id}--报名ID； {=time}--活动时间； {=address}--活动地址； {=blank}--&amp;nbsp;  {=signature}--全局邮件签名</span></label>
            </div>

            <div class="manage-addActive-form-item manage-form-but">
              <input class="green" type="submit" value="提交"/>
              <input class="gray" type="reset" value="重置"/>
            </div>
          </div>
        </div>
      </form>
    </div>
    
  </div>
</div>

<% include ../etc/foot.ejs %>

<script>
  var ue = UE.getEditor('editor');
</script>
</body>
</html>